﻿// <copyright file="GetRequestBody.cs" company="SharpSTS">
// Copyright (c) 2007, 2008 All Right Reserved, http://sharpsts.com/
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Barry Dorrans</author>
// <email>barryd@idunno.org</email>
// <date>2008-06-13</date>
// <summary>Provides the data contract for a Get request for an Information Card.</summary>

namespace SharpSTS.CardControl
{
    using System;
    using System.Runtime.Serialization;

    using Constants;
    
    /// <summary>
    /// A <see cref="DataContract"/> for the <see cref="ICardControlService"/> Get request.
    /// </summary>
    [DataContract(Name = "GetRequestBody", Namespace = Namespaces.Data)]
    public class GetRequestBody
    {
        /// <summary>
        /// Gets or sets the user identifier.
        /// </summary>
        /// <value>The user identifier.</value>
        [DataMember(Order = 1, IsRequired = true)]
        public string UserIdentifier
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the type of the authentication the card will use.
        /// </summary>
        /// <value>The type of the authentication.</value>
        [DataMember(Order = 2, IsRequired = true)]
        public AuthenticationType AuthenticationType
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the authentication hint for the card.
        /// </summary>
        /// <value>The authentication hint.</value>
        [DataMember(Order = 3, IsRequired = true)]
        public AuthenticationHint AuthenticationHint
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the name of the card.
        /// </summary>
        /// <value>The name of the card.</value>
        [DataMember(Order = 4, IsRequired = false)]
        public string CardName
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the name of the image file for the card.
        /// </summary>
        /// <value>The name of the image file.</value>
        [DataMember(Order = 5, IsRequired = false)]
        public string ImageFileName
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the list of claims the card supports.
        /// </summary>
        /// <value>The list of claims the card supports.</value>
        [System.Diagnostics.CodeAnalysis.SuppressMessage(
            "Microsoft.Performance",
            "CA1819:PropertiesShouldNotReturnArrays",
            Justification = "Service Data Contract; this is allowed and is more specific than a marshalled list.")]
        [DataMember(Order = 6, IsRequired = false)]
        public ManagedCardClaim[] Claims
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the expiry date time for the card.
        /// </summary>
        /// <value>The expiry date time.</value>
        [DataMember(Order = 7, IsRequired = false)]
        public DateTime ExpiryDateTime
        {
            get;
            set;
        }
    }
}